package com.fatdetection.demo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fatdetection.demo.bean.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserService {
    User login(String phone, String password);
    Map<String, Object> insertList(List<Object> datalist, String  filename);
    Page<User> selectAllPage(Integer current, Integer size, String searchKey, String searchVal);
    public int insertUser(User user);//添加被测人员

    public Boolean delUser(String phone);//删除

    public Boolean updateUser(User user);//根据学号和学校确定某一个用户

    public List<User> findAll();//查询所有用户

    public List<User> findUserByGroup(int groupId);//根据分组查找用户

    public List<User> findUserByGroupAndOrder(int groupId);//根据分组查找用户（按orderNo）

    public User findUserByIdAndSchool(@Param("studentId") String studentId, @Param("schoolName") String schoolName);//根据学校和学号查找用户

    public List<User> searchUser(String info, Integer projectId);//根据info（学号or姓名）查询用户list
    List<User> searchUserByPhoneAndName(String info, Integer projectId);

    public List<User> findUserByProj(String projectName);

    public User findUserByPhone(String phone);

    public List<User> findUsersByProjectId(Integer projectId);
}
